<!DOCTYPE>
<html>
@include('common.head')
<meta name="csrf-token" content="{{ csrf_token() }}">
<body>
	<!--header-->
	@include('common.navbar')
	<!-- header end -->
	
	<div class="page-container"> 
		<div class="page-content" id="mainContents"> 
		  	<div class="container-fluid">
				<div class="row-fluid clearfix">
			    	<!-- BEGIN STYLE CUSTOMIZER -->
			        <div class="span12"> 	          		          
			          <h3 class="page-title"> &nbsp; </h3>
			          <ul class="breadcrumb">
			            <li> <i class="icon-home"></i> <a href="index.html">首页</a> <i class="icon-angle-right"></i> </li>
			            <li><a href="javascript:;">任务列表</a></li>		            
			          </ul>		          		          		          
			        </div>
			        <!-- END PAGE TITLE & BREADCRUMB--> 
			    </div>
				<!-- BEGIN PAGE CONTENT-->
	
				<div class="row-fluid">
					<div class="tabbable tabbable-custom tabbable-full-width">
		
						<ul class="nav nav-tabs" id="singletabs">
							<li @if($_GET['p'] == 'detonate')class="active"@endif ><a href="/verify/list?p=detonate&s=30"> 易制爆认证</a></li>
							<li @if($_GET['p'] == 'poison')class="active"@endif ><a href="/verify/list?p=poison&s=30"> 易制毒认证</a></li>
						</ul>
		
						<div class="tab-content layui-tab-content sigle-taber">
							<!--易制爆认证-->
							<div id="tab_1_bao" class="tab-pane onlytab active">
								
								<div class="row-fluid margin-bottom-20" style="width: 98%; margin: 0 auto">
									<div class="span12">	
										<ul class="nav nav-tabs" id="singletabs">
											<li @if($_GET['s'] == 30)class="active"@endif><a href="/verify/list?p=poison&s=30">待认证</a></li>
											<li @if($_GET['s'] == 'transport')class="active"@endif><a href="/verify/list?p=poison&s=transport">待办运输证</a></li>
											<li><a href="#">认证通过</a></li>
											<li><a href="#">认证不通过</a></li>
										</ul>
										<div class="tab-content">
											<!--待认证-->
											<div class="tab-pane active" id="tab_son_wait">
												<!-- BEGIN EXAMPLE TABLE PORTLET-->
												<div class="portlet box light-grey">	
													<div class="portlet-body">	
														<div class="ordertball table-responsive margin-bottom-20">
														    <table class="table table-bordered tablelist" id="dataTableDetail">
											                    <thead class="tbhead">
												                    <tr>	
												                        <th class="t1">
												                        	<p>序号</p>
												                        	<div class="controls lastrate">
												                        		<input class="input-control putw2" type="hidden" readonly>
																			</div>
												                        </th>	
												                        <th class="t1">
												                        	<p>关联订单</p>
												                        	<div class="controls">
																				<input class="input-control putw2" type="text" placeholder="请输入关联订单">
																			</div>
												                        </th>
												                        <th class="t1">
												                        	<p>公司名称</p>
												                        	<div class="controls">
																				<select class="input-control selwd2 c-custname" name="custName">
																					<option value="1">上海西西股份科技有限公司</option>
																					<option value="2">东莞市伊能润滑油有限公司</option>
																					<option value="3">上海百度腾讯BAT上市公司</option>
																				</select>
																			</div>
												                        </th>
												                        <th class="t1">
												                        	<p>公司属性</p>
												                        	<div class="controls">
																				<select class="input-control selwd2 c-custname" name="custName">
																					<option value="1">经销商</option>
																					<option value="2">终端企业用户</option>
																					<option value="3">科研用户</option>
																				</select>
																			</div>
												                        </th>
												                        <th class="t1">
												                        	<p>企业营业执照</p>	
												                        	<div class="controls lastrate">
												                        		<input class="input-control putw2" type="hidden" readonly>
																			</div>
												                        </th>
												                        <th class="t1">
												                        	<p>法人身份证</p>	
												                        	<div class="controls lastrate">
												                        		<input class="input-control putw2" type="hidden" readonly>
																			</div>
												                        </th>
												                        <th class="t1">
												                        	<p>经营备案证明</p>	
												                        	<div class="controls lastrate">
												                        		<input class="input-control putw2" type="hidden" readonly>
																			</div>
												                        </th>
												                        <th class="t1">
												                        	<p>事业单位法人证书</p>
												                        	<div class="controls lastrate">
												                        		<input class="input-control putw2" type="hidden" readonly>
																			</div>
												                        </th>
												                        <th class="t1">
												                        	<p>易制毒化学品购买备案证明</p>	
												                        	<div class="controls lastrate">
												                        		<input class="input-control putw2" type="hidden" readonly>
																			</div>
												                        </th>
												                        <th class="t1">
												                        	<p>委托书</p>	
												                        	<div class="controls lastrate">
												                        		<input class="input-control putw2" type="hidden" readonly>
																			</div>
												                        </th>
												                        <th class="t1">
												                        	<p>合同</p>	
												                        	<div class="controls lastrate">
												                        		<input class="input-control putw2" type="hidden" readonly>
																			</div>
												                        </th>
												                        <th class="t1">
												                        	<p>上传时间</p>
												                        	<div class="controls">
												                        		<input placeholder="开始时间" class="input-control putw3 c-begintime" type="text" name="beginTime" id="beginTime">
												                        		-
												                        		<input placeholder="结束时间" class="input-control putw3 c-endtime" type="text" name="endTime" id="endTime">
												                        	</div>
												                        </th>
												                        @if($_GET['s'] == 'transport')
												                        <th class="t1">
												                        	<p>操作</p>	
												                        	<div class="controls lastrate">
												                        		<input class="input-control putw2" type="hidden" readonly>
																			</div>
												                        </th>
												                        @endif                      
												                    </tr>
											                    </thead>
											                    <tbody class="tbbody">
											                    	@foreach ($rs['list'] as $data)
												                    <tr>
												                    	<td>1</td>
												                        <td><a href="javascript:;" class="j-remonet">{{$data->order_id}}</a></td>
												                        <td>{{$data->cust_name}}</td>
												                        <td>
												                        	@switch($data->property)
																			    @case('detonate')
																			        易制爆
																			        @break
																			    @case('poison')
																			        易制毒
																			        @break
																			    @default
																			        普通
																			@endswitch
												                        </td>
												                        <!--企业营业执照-->
												                        <td class="lasttd">
												                        	@if ($data->cust_type != 2)
													                        	@if ($data->license_status == 1)
													                        	<span>已认证</span>
													                        	@else
													                        	<a class="c-put orderauth j-comylice" href="javascript:verify_pic('{{$data->order_id}}','license');" data-name="compy">点击认证</a>
													                        	@endif
													                        @else
													                        	<span>----</span>
													                        @endif
												                        </td>
												                        <!--法人身份证-->
												                        <td class="lasttd">
												                        	@if ($data->legal_card_status == 1)
												                        	<span>已认证</span>
												                        	@else
												                        	<a class="c-put orderauth j-percard" href="javascript:verify_pic('{{$data->order_id}}','legal_card');" data-name="compy">点击认证</a>
												                        	@endif
												                        </td>
												                        <!--经营备案证明-->
												                        <td class="lasttd">
												                        	@if ($data->cust_type == 0)
													                        	@if ($data->market_card_status == 1)
													                        	<span>已认证</span>
													                        	@else
													                        	<a class="c-put orderauth j-partends" href="javascript:verify_pic('{{$data->order_id}}','market_card');">点击认证</a>
													                        	@endif
													                        @else
												                        		<span>----</span>
												                        	@endif
												                        </td>
												                        <td class="lasttd">
												                        	@if ($data->cust_type == 2)
													                        	@if ($data->bussines_legal_card_status == 1)
														                        	<span>已认证</span>
													                        	@else
														                        	<a class="c-put orderauth j-comylice" href="javascript:verify_pic('{{$data->order_id}}','bussines_legal_card');" data-name="compy">点击认证</a>
													                        	@endif
												                        	@else
												                        	<span>----</span>
												                        	@endif
												                        </td>
												                        <td class="lasttd">
												                        	@if ($data->shop_card_status == 1)
												                        	<span>已认证</span>
												                        	@else
												                        		@if ($data->shop_card_id != NUll)
												                        		<a class="c-put orderauth j-partends" href="javascript:verify_pic('{{$data->order_id}}','shop_card');">点击认证</a>
												                        		@else
												                        		<span>----</span>
												                        		@endif
												                        	@endif
												                        </td>
												                        <td class="lasttd">
												                        	@if ($data->transport_proxy_status == 1)
												                        	<span>已认证</span>
												                        	@else
												                        		@if ($data->transport_proxy != NUll)
												                        		<a class="c-put orderauth j-partends" href="javascript:verify_pic('{{$data->order_id}}','transport_proxy');">点击认证</a>
												                        		@else
												                        		<span>----</span>
												                        		@endif
												                        	@endif
												                        </td>
												                        <td class="lasttd">
												                        	@if ($data->transport_contract_status == 1)
												                        	<span>已认证</span>
												                        	@else
												                        		@if ($data->transport_proxy != NUll)
												                        		<a class="c-put orderauth j-partends" href="javascript:verify_pic('{{$data->order_id}}','transport_contract');">点击认证</a>
												                        		@else
												                        		<span>----</span>
												                        		@endif
												                        	@endif
												                        </td>
												                        <td>{{date('Y-m-d H:i:s',$data->upload_time)}}</td>
												                        @if($_GET['s'] == 'transport')
												                        <td class="lasttd">
												                        	@if ($data->transport_status == 1)
												                        	<span>已认证</span>
												                        	@else
												                        		@if ($data->transport_id == NUll)
												                        		<a class="c-put orderauth j-partends" href="javascript:verify_pic('{{$data->order_id}}','transport');">上传运输证</a>
												                        		@else
												                        		<span>----</span>
												                        		@endif
												                        	@endif
												                        </td>
												                        @endif
												                    </tr>
												                    @endforeach
											                    </tbody>
											               </table>
														</div>
														<!--page-->
										                <div class="row-fluid">
											               	<div class="span6"><div class="dataTables_info" id="sample_editable_1_info">共{{$rs['size']}}条数据</div></div>
											               	<div class="span6">
											               		<div class="dataTables_paginate paging_bootstrap pagination">
										               			 	<div class="chnumer">
									               			 			<span>显示数目:</span>
									               			 			<span class="spel">
									               			 				<select class="" name="shNumer">
																				<option @if (isset($_GET['limit']) && $_GET['limit'] == '10')selected="selected"@endif value="10">10</option>
																				<option @if (isset($_GET['limit']) && $_GET['limit'] == '20')selected="selected"@endif value="20">20</option>
																				<option @if (isset($_GET['limit']) && $_GET['limit'] == '30')selected="selected"@endif value="30">30</option>
																				<option @if (isset($_GET['limit']) && $_GET['limit'] == '50')selected="selected"@endif value="50">50</option>
																			</select>
									               			 			</span>
																		
										               			 	</div>
											               			{{ $rs['page'] }}
											               			<div class="clearfix"></div>
											               		</div>
											               	</div>
											            </div>
													</div>	
												</div>	
												<!-- END EXAMPLE TABLE PORTLET-->	
											</div>
										</div>
									</div>
								</div>						
							</div>
							<!--易制毒认证-->
							<div id="tab_1_du" class="tab-pane onlytab">
								<div class="row-fluid margin-bottom-20">
									<div class="span12">	
										
									</div>
								</div>						
							</div>
		
							<!--end tab-pane-->
						</div>
		
					</div>
		
					<!--end tabbable-->           
		
				</div>
	
				<!-- END PAGE CONTENT-->
	
			</div>
		</div>
	</div>
	
	<!-- footer -->
	@include('common.footer')
    <!--关联订单弹窗-->
    <div class="relevorder hide j-relevOrder">
    	<div class="row-fluid">
			<div class="span12">
				<div class="portlet box light-grey widper98 padding-top-20 margin-bottom-15">	
					<div class="portlet-body">
						<div class="ordertball table-responsive">
						    <table class="table table-bordered tablelist" id="dataTableDetail">
			                    <thead class="tbhead">
				                    <tr>	
				                        <th class="t1">
				                        	<p>序号</p>
				                        </th>	
				                        <th class="t1">
				                        	<p>商品名称</p>
				                        </th>
				                        <th class="t1">
				                        	<p>产品属性</p>
				                        </th>
				                        <th class="t1">
				                        	<p>规格</p>
				                        </th>
				                        <th class="t1">
				                        	<p>单位</p>
				                        </th>
				                        
				                        <th class="t1">
				                        	<p>数量</p>
				                        </th>								                       
				                    </tr>
			                    </thead>
			                    <tbody class="tbbody tbbody-user">
				                    <tr>
				                    	<td>1</td>
				                        <td>(易制毒三类）2-丁酮，不销售，>95%</td>
				                        <td>一般品</td>
				                        <td>500ml</td>
				                        <td>箱</td>
				                        <td>20</td>
				                    </tr>
				                    <tr>
				                    	<td>2</td>
				                        <td>(易制毒三类）2-丁酮，不销售，>20%</td>
				                        <td class="prired">易制爆</td>
				                        <td>500ml</td>
				                        <td>箱</td>
				                        <td>20</td>
				                    </tr>
				                    <!--合计-->
				                    <tr>
				                    	<td>合计</td>
				                        <td></td>
				                        <td></td>
				                        <td></td>
				                        <td></td>
				                        <td>20000</td>
				                    </tr>
			                    </tbody>
			               </table>
						</div>
					</div>				
				</div>				
			</div>
		</div>
    </div>
    

    <!--step1后 step2>- 点击“确定”-录入弹窗-step3 -->
    <div class="entering hide" id="j-entering">  	
		<div class="row-fluid">
			<div class="span12">
				<form action="#" id="form_entring" class="form-horizontal padding-top-20">
					<div class="control-group">
						<label class="control-label tanwid">信用代码</label>
						<div class="controls mlft">			
							<input type="text" class="span8 m-wrap c-reditcode" autocomplete="off" id="credit_code" placeholder="例：913101150729157011">		
						</div>			
					</div>
					<div class="control-group">
						<label class="control-label tanwid">法人名称</label>
						<div class="controls mlft">			
							<input type="text" class="span8 m-wrap c-pepname" autocomplete="off" id="legal_name" placeholder="请输入法人名称">		
						</div>			
					</div>
					<div class="control-group">
						<label class="control-label tanwid">有效期至</label>
						<div class="controls mlft">
							<input placeholder="截止时间" class="span8 c-begintime" type="text" name="license_validity" id="license_validity">
						</div>		
					</div>
					<div class="congroup">
						<label class="control-label tanwid"></label>
						<div class="controls mlft prired j-utiper"> <!--验证错误--> </div>			
					</div>
				</form>
			</div>
		</div>
    </div> 
    <!--“企业营业执照” 点击认证不通过弹框 -->
    <div class="compycancle j-comyCancle hide">
    	<div class="portlet-body">			
			<!-- BEGIN FORM-->
			<form action="#" id="form_compycancle" class="form-horizontal padding-top-20">
    			<div class="control-group">
					<label class="control-label">认证不通过理由</label>
					<div class="controls">					
						<input type="text" class="span4 m-wrap c-nreason" autocomplete="off" id="failRemark"  placeholder="请输入不通过原因">		
					</div>			
				</div>
	    	</form>
	   </div>
    </div>
    <!--end-->
    
	<!--
		*事业单位法人证书相关信息-弹窗form
		*（弹窗图片认证同上，不能省略同上需要认证-步骤同上 暂略过
	-->
	<div class="institution hide" id="j-instution">  	
		<div class="row-fluid">
			<div class="span12">
				<form action="#" id="form_entring" class="form-horizontal padding-top-20">
					<div class="control-group">
						<label class="control-label tanwid">法人名称</label>
						<div class="controls mlft">			
							<input type="text" class="span8 m-wrap c-pardname" autocomplete="off" id="legal_name2" placeholder="请输入法人名称">		
						</div>			
					</div>
					<div class="control-group">
						<label class="control-label tanwid">有效期至</label>
						<div class="controls mlft">
							<input placeholder="截止时间" class="span8 c-begintime" type="text" name="legal_card_validity" id="legal_card_validity">
						</div>		
					</div>
					<div class="congroup">
						<label class="control-label tanwid"></label>
						<div class="controls mlft prired j-ptiper"> <!--验证错误--> </div>			
					</div>
				</form>
			</div>
		</div>
    </div> 
    <div class="shopcard hide" id="j-shopcard">  	
		<div class="row-fluid">
			<div class="span12">
				<form action="#" id="form_entring" class="form-horizontal padding-top-20">
					<div class="control-group">
						<label class="control-label tanwid">证件编号</label>
						<div class="controls mlft">			
							<input type="text" class="span8 input-control m-wrap c-pardname" autocomplete="off" id="card_code" placeholder="请输入证件编号">		
						</div>			
					</div>
					<div class="control-group">
						<label class="control-label tanwid">有效次数</label>
						<div class="controls mlft">			
							一次有效 <input type="radio" class="m-wrap c-pardname" value="1" autocomplete="off" name="card_type" style="vertical-align: top;">
							多次有效 <input type="radio" class="m-wrap c-pardname" value='2' autocomplete="off" name="card_type" style="vertical-align: top;">
						</div>			
					</div>
					<div class="control-group">
						<label class="control-label tanwid">购买商品</label>
						<div class="controls mlft">			
							<input type="text" class="span8 input-control m-wrap c-pardname" autocomplete="off" id="product_id" placeholder="请输入商品">		
						</div>			
					</div>
					<div class="control-group">
						<label class="control-label tanwid">商品规格</label>
						<div class="controls mlft">			
							<input type="text" class="span4 input-control m-wrap c-pardname" autocomplete="off" id="product_size" placeholder="15">/
							<select class="span4 m-wrap c-cardterm" id="product_standard" style="border-radius: 0 ">
								<option value="">请选择</option>
								<option value="ml">ml</option>
								<option value="升">升</option>
								<option value="千克">千克</option>
								<option value="吨">吨</option>
							</select>
						</div>			
					</div>
					<div class="control-group">
						<label class="control-label tanwid">购买用途</label>
						<div class="controls mlft">			
							销售 <input type="radio" value="1" class="m-wrap c-pardname" autocomplete="off" name="used" style="vertical-align: top;">
							生产 <input type="radio" value="2" class="m-wrap c-pardname" autocomplete="off" name="used" style="vertical-align: top;">
							使用 <input type="radio" value="3" class="m-wrap c-pardname" autocomplete="off" name="used" style="vertical-align: top;">
						</div>			
					</div>
					<div class="control-group">
						<label class="control-label tanwid">有效期至</label>
						<div class="controls mlft">
							<input placeholder="截止时间" class="span8 input-control c-begintime" type="text" name="etime" id="etime">
						</div>		
					</div>
					<div class="congroup">
						<label class="control-label tanwid"></label>
						<div class="controls mlft prired j-ptiper"> <!--验证错误--> </div>			
					</div>
				</form>
			</div>
		</div>
    </div> 
    <!--end-->
    
    <!--
		*法人身份证证明-弹窗form
		*（弹窗图片认证同上，不能省略同上需要认证-步骤同上 暂略过
	-->
    <div class="ficialper hide" id="j-perficial">  	
		<div class="row-fluid">
			<div class="span12">
				<form action="#" id="form_ficialper" class="form-horizontal padding-top-20">
					<div class="control-group">
						<label class="control-label tanwid">品种类别</label>
						<div class="controls mlft">
							<select class="span8 m-wrap c-cardterm" id="market_cate">
								<option value="">请选择</option>
								<option value="2">第二类</option>
								<option value="3">第三类</option>
							</select>
						</div>		
					</div>
					<div class="control-group">
						<label class="control-label tanwid">有效期至</label>
						<div class="controls mlft">
							<input placeholder="截止时间" class="span8 c-begintime" type="text" name="market_card_validity" id="market_card_validity">
						</div>		
					</div>
					<div class="congroup">
						<label class="control-label tanwid"></label>
						<div class="controls mlft prired j-ctiper"> <!--验证错误--> </div>			
					</div>
				</form>
			</div>
		</div>
    </div> 
    <div class="bussines hide" id="j-bussines">  	
		<div class="row-fluid">
			<div class="span12">
				<form action="#" id="form_entring" class="form-horizontal padding-top-20">
					<div class="control-group">
						<label class="control-label tanwid">事业单位法人证</label>
						<div class="controls mlft">			
							<input type="text" class="span8 m-wrap c-pardname" autocomplete="off" id="bussines_legal_name" placeholder="请输入事业单位法人名称">		
						</div>			
					</div>
					<div class="control-group">
						<label class="control-label tanwid">有效期至</label>
						<div class="controls mlft">
							<input placeholder="截止时间" class="span8 c-begintime" type="text" name="bussines_legal_card_validity" id="bussines_legal_card_validity">
						</div>		
					</div>
					<div class="congroup">
						<label class="control-label tanwid"></label>
						<div class="controls mlft prired j-ptiper"> <!--验证错误--> </div>			
					</div>
				</form>
			</div>
		</div>
    </div> 
    <div class="comform hide" id="j-comform">  	
		<div class="row-fluid">
			<div class="span12">
				<form action="#" id="form_ficialper" class="form-horizontal padding-top-20">
					<div class="control-group">
						<div class="controls mlft">
							确认认证通过吗
						</div>		
					</div>
					<div class="congroup">
						<label class="control-label tanwid"></label>
						<div class="controls mlft prired j-ctiper"> <!--验证错误--> </div>			
					</div>
				</form>
			</div>
		</div>
    </div> 
    <!--end-->
    
    <!---
    	*购买人身份证明(只有弹窗图片认证)，不存档
    --->
	<script src="{{URL::asset('static/js/bootstrap/bootstrap-datepicker.min.js')}}"></script>
	<script src="{{URL::asset('static/js/bootstrap/bootstrap-datepicker.zh-CN.min.js')}}"></script>
	<link rel="stylesheet" href="{{URL::asset('static/style/bootstrap/bootstrap-datepicker3.standalone.min.css')}}">

	<!-- 待认证 -->
	<script type="text/javascript" src="{{URL::asset('static/js/lib/zi-waitquality.js')}}"></script>
   
	<script>

		function verify_pic(order_id,field){
			var title = ''
			if(field == 'legal_card'){
				title = '法人身份证';
			}
			if(field == 'license'){
				title = '企业营业执照认证';
			}
			if(field == 'market_card'){
				title = '经营备案证明';
			}
			layer.open({
	            type:2,
	            title: title,
	            offset: 't',
	            area:['70%','95%'],
	            btn:["认证通过","认证不通过"],
	            content:'/verify/verifyPic?id='+order_id+'&field='+field,
	            yes:function(index, layero){
	            	if(verify_pass(order_id,field,index,layero) == true){
	            		layer.close(index);	
	            	}
	            },
	            btn2: function(index, layero){
	            	layer.close(index);
    				verifyFail(order_id,field,index,layero);
  				}
	        });
		}
		function verify_pass(order_id,field,index,layero){
			if(field == 'bussines_legal_card'){
				dataTimeSelect("bussines_legal_card_validity");
				layer.open({
				  	type:1,
					title: '确认信息',
					offset: 't',
					area:['550px',''],
					btn:["确定","取消"],
					content:$('#j-bussines'),
					//确定
					yes: function(){
						$.ajaxSetup({
							headers: {
							'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
							}
						});
						var legal_name = $('#bussines_legal_name').val();
						var bussines_legal_card_validity = $('#bussines_legal_card_validity').val();
						if(legal_name == ''){
							layer.msg("事业单位法人证姓名不能为空",{icon:2,time:1500});
							return false;
						}
						if(bussines_legal_card_validity == ''){
							layer.msg("有效期不能为空",{icon:2,time:1500});
							return false;
						}
						$.ajax({
							url: "/verify/verifyMatreial",
							type : "post", 
							dataType :"json",
							data:'&id='+order_id+'&field='+field+'&legal_name='+legal_name+'&bussines_legal_card_validity='+bussines_legal_card_validity, 
							success: function(data){
								window.location.reload();
							},
							error: function(data){
							layer.msg('ERROR!',{icon:2,time:1000});
							}
						});
					},
					//点击取消
					btn2:function(){
						layer.open({
							type:1,
							title: '取消审核提示',
							area:['350px',''],
							btn:["知道了"],
							btnAlign:"c",
							content:"<strong class='tip-licerego'>审核未完成，稍后请重新审核</strong>",
							yes:function(){
								layer.closeAll()
							}
						})
					}
				});
			}
			if(field == 'transport'){
				var body = layer.getChildFrame('body', index);
    			var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象，执行iframe页的方法：iframeWin.method();
    			iframeWin.dosubmit();
				return false;
			}
			if(field == 'license'){
				dataTimeSelect("license_validity");
				layer.open({
				  	type:1,
					title: '确认信息',
					offset: 't',
					area:['550px',''],
					btn:["确定","取消"],
					content:$('#j-entering'),
					//确定
					yes: function(){
						$.ajaxSetup({
							headers: {
							'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
							}
						});
						var credit_code = $('#credit_code').val();
						var legal_name = $('#legal_name').val();
						var license_validity = $('#license_validity').val();
						if(credit_code == ''){
							layer.msg("信用代码不能为空",{icon:2,time:1500});
							return false;
						}
						if(legal_name == ''){
							layer.msg("法人姓名不能为空",{icon:2,time:1500});
							return false;
						}
						if(license_validity == ''){
							layer.msg("合同截止日期不能为空",{icon:2,time:1500});
							return false;
						}
						$.ajax({
							url: "/verify/verifyMatreial",
							type : "post", 
							dataType :"json",
							data:'&id='+order_id+'&field='+field+'&credit_code='+credit_code+'&legal_name='+legal_name+'&license_validity='+license_validity, 
							success: function(data){

							},
							error: function(data){
							layer.msg('ERROR!',{icon:2,time:1000});
							}
						});
						window.location.reload();
					},
					//点击取消
					btn2:function(){
						layer.open({
							type:1,
							title: '取消审核提示',
							area:['350px',''],
							btn:["知道了"],
							btnAlign:"c",
							content:"<strong class='tip-licerego'>审核未完成，稍后请重新审核</strong>",
							yes:function(){
								layer.closeAll()
							}
						})
						
					}
				});
			}
			if(field == 'legal_card'){
				dataTimeSelect("legal_card_validity");
				layer.open({
				  	type:1,
					title: '确认信息',
					offset: 't',
					area:['550px',''],
					btn:["确定","取消"],
					content:$('#j-instution'),
					//确定
					yes: function(){
						$.ajaxSetup({
							headers: {
							'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
							}
						});
						var legal_name = $('#legal_name2').val();
						var legal_card_validity = $('#legal_card_validity').val();
						if(legal_name == ''){
							layer.msg("法人姓名不能为空",{icon:2,time:1500});
							return false;
						}
						if(legal_card_validity == ''){
							layer.msg("身份证有效期不能为空",{icon:2,time:1500});
							return false;
						}
						$.ajax({
							url: "/verify/verifyMatreial",
							type : "post", 
							dataType :"json",
							data:'&id='+order_id+'&field='+field+'&legal_name='+legal_name+'&legal_card_validity='+legal_card_validity, 
							success: function(data){

							},
							error: function(data){
							layer.msg('ERROR!',{icon:2,time:1000});
							}
						});
						window.location.reload();
					},
					//点击取消
					btn2:function(){
						layer.open({
							type:1,
							title: '取消审核提示',
							area:['350px',''],
							btn:["知道了"],
							btnAlign:"c",
							content:"<strong class='tip-licerego'>审核未完成，稍后请重新审核</strong>",
							yes:function(){
								layer.closeAll()
							}
						})
						
					}
				});
			}
			if(field == 'market_card'){
				dataTimeSelect("market_card_validity");
				layer.open({
				  	type:1,
					title: '确认信息',
					offset: 't',
					area:['550px',''],
					btn:["确定","取消"],
					content:$('#j-perficial'),
					//确定
					yes: function(){
						$.ajaxSetup({
							headers: {
							'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
							}
						});
						var market_cate = $('#market_cate').val();
						var market_card_validity = $('#market_card_validity').val();
						if(market_cate == ''){
							layer.msg("请选择品种类别",{icon:2,time:1500});
							return false;
						}
						if(market_card_validity == ''){
							layer.msg("有效期不能为空",{icon:2,time:1500});
							return false;
						}
						$.ajax({
							url: "/verify/verifyMatreial",
							type : "post", 
							dataType :"json",
							data:'&id='+order_id+'&field='+field+'&market_cate='+market_cate+'&market_card_validity='+market_card_validity, 
							success: function(data){

							},
							error: function(data){
							layer.msg('ERROR!',{icon:2,time:1000});
							}
						});
						window.location.reload();
					},
					//点击取消
					btn2:function(){
						layer.open({
							type:1,
							title: '取消审核提示',
							area:['350px',''],
							btn:["知道了"],
							btnAlign:"c",
							content:"<strong class='tip-licerego'>审核未完成，稍后请重新审核</strong>",
							yes:function(){
								layer.closeAll()
							}
						})
						
					}
				});
			}
			if(field == 'shop_card'){
				dataTimeSelect("etime");
				layer.open({
				  	type:1,
					title: '确认信息',
					offset: 't',
					area:['550px',''],
					btn:["确定","取消"],
					content:$('#j-shopcard'),
					//确定
					yes: function(){
						$.ajaxSetup({
							headers: {
							'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
							}
						});
						var card_type = $("input[name='card_type']:checked").val();
						var used = $("input[name='used']:checked").val();
						var card_code = $('#card_code').val();
						var etime = $('#etime').val();
						var product_id = $('#product_id').val();
						var product_size = $('#product_size').val();
						var product_standard = $('#product_standard').val();
						if(card_code == ''){
							layer.msg("编号不能为空",{icon:2,time:1500});
							return false;
						}
						if(card_type == undefined){
							layer.msg("请选择有效次数",{icon:2,time:1500});
							return false;
						}
						if(product_id == ''){
							layer.msg("请选择商品",{icon:2,time:1500});
							return false;
						}
						if(product_size == ''){
							layer.msg("请填写规格",{icon:2,time:1500});
							return false;
						}
						if(product_standard == ''){
							layer.msg("请选择规格",{icon:2,time:1500});
							return false;
						}
						if(used == undefined){
							layer.msg("请选择用途",{icon:2,time:1500});
							return false;
						}
						if(etime == ''){
							layer.msg("有效期不能为空",{icon:2,time:1500});
							return false;
						}
						$.ajax({
							url: "/verify/verifyMatreial",
							type : "post", 
							dataType :"json",
							data:'&id='+order_id+'&field='+field+'&card_code='+card_code+'&etime='+etime+'&card_type='+card_type+'&used='+used+'&product_id='+product_id+'&product_size='+product_size+'&product_standard='+product_standard, 
							success: function(data){

							},
							error: function(data){
							layer.msg('ERROR!',{icon:2,time:1000});
							}
						});
						window.location.reload();
					},
					//点击取消
					btn2:function(){
						layer.open({
							type:1,
							title: '取消审核提示',
							area:['350px',''],
							btn:["知道了"],
							btnAlign:"c",
							content:"<strong class='tip-licerego'>审核未完成，稍后请重新审核</strong>",
							yes:function(){
								layer.closeAll()
							}
						})
						
					}
				});
			}
			if(field == 'transport_proxy'){
				layer.open({
				  	type:1,
					title: '确认信息',
					offset: 't',
					area:['550px',''],
					btn:["确定","取消"],
					content:$('#j-comform'),
					//确定
					yes: function(){
						$.ajaxSetup({
							headers: {
								'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
							}
						});
						$.ajax({
							url: "/verify/verifyMatreial",
							type : "post", 
							dataType :"json",
							data:'&id='+order_id+'&field='+field, 
							success: function(data){

							},
							error: function(data){
							layer.msg('ERROR!',{icon:2,time:1000});
							}
						});
						window.location.reload();
					},
					//点击取消
					btn2:function(){
						layer.open({
							type:1,
							title: '取消审核提示',
							area:['350px',''],
							btn:["知道了"],
							btnAlign:"c",
							content:"<strong class='tip-licerego'>审核未完成，稍后请重新审核</strong>",
							yes:function(){
								layer.closeAll()
							}
						})
						
					}
				});
			}
			if(field == 'transport_contract'){
				layer.open({
				  	type:1,
					title: '确认信息',
					offset: 't',
					area:['550px',''],
					btn:["确定","取消"],
					content:$('#j-comform'),
					//确定
					yes: function(){
						$.ajaxSetup({
							headers: {
								'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
							}
						});
						$.ajax({
							url: "/verify/verifyMatreial",
							type : "post", 
							dataType :"json",
							data:'&id='+order_id+'&field='+field, 
							success: function(data){

							},
							error: function(data){
							layer.msg('ERROR!',{icon:2,time:1000});
							}
						});
						window.location.reload();
					},
					//点击取消
					btn2:function(){
						layer.open({
							type:1,
							title: '取消审核提示',
							area:['350px',''],
							btn:["知道了"],
							btnAlign:"c",
							content:"<strong class='tip-licerego'>审核未完成，稍后请重新审核</strong>",
							yes:function(){
								layer.closeAll()
							}
						})
						
					}
				});
			}
			return true;
		}
		function verifyFail(order_id,field){
			layer.open({
			  	type:1,
				title: '认证不通过信息提示',
				area:['550px',''],
				offset: 't',
				btn:["确定","取消"],
				content:$('.j-comyCancle'),
				//确定
				yes: function(){
					var reason = $.trim($(".c-nreason").val())
					if(!reason){
						layer.msg("请输入不通过原因",{icon:2,time:1500});
						$(".c-nreason").focus();
					}else{
						$.ajaxSetup({
							headers: {
							'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
							}
						});
						$.ajax({
							url: "/verify/verifyMatreialFail",
							type : "post", 
							dataType :"json",
							data:'&id='+order_id+'&field='+field+'&remark='+$('#failRemark').val(), 
							success: function(data){

							},
							error: function(data){
							layer.msg('ERROR!',{icon:2,time:1000});
							}
						});
						layer.closeAll()
					}
				},
				//点击取消
				btn2:function(){
					layer.open({
						type:1,
						title: '取消审核提示',
						area:['350px',''],
						btn:["知道了"],
						btnAlign:"c",
						content:"<strong class='tip-licerego'>审核未完成，稍后请重新审核</strong>",
						yes:function(){
							layer.closeAll()
						}
					})
					
				}
			});
		}
		/*
			* name:时间范围控件
			* start:起始时间表单id值
			* end:结束时间表单id值
			*
    	*/
		function dataTimeRange(start,end){//日期范围
		    $('#'+start).datetimepicker({
		        todayBtn : "linked",
		        autoclose : true,
		        todayHighlight : true,
		        endDate : new Date(),
		        format:'yyyy-mm-dd hh:ii',
		        language:'zh-CN'
		    }).on('changeDate',function(e){
		        var startTime = e.date;
		        $('#'+end).datetimepicker('setStartDate',startTime);
		        // search_list();
		    }).on('hide',function(e){
		        // search_list();
		    });
		 
		    //结束时间
		    $('#'+end).datetimepicker({
		        todayBtn : "linked",
		        autoclose : true,
		        todayHighlight : true,
		        endDate : new Date(),
		        format:'yyyy-mm-dd hh:ii',
		        language:'zh-CN'
		    }).on('changeDate',function(e){
		        var endTime = e.date;
		        $('#'+start).datetimepicker('setEndDate',endTime);
		        // search_list();
		    }).on('hide',function(e){
		        // search_list();
		    });
		} 
		function dataTimeSelect(start){//日期范围
		    $('#'+start).datetimepicker({
		        minView: "month",//设置只显示到月份
		        autoclose : true,
		        todayHighlight : true,
		        // endDate : new Date(),
		        format:'yyyy-mm-dd',
		        language:'zh-CN'
		    });
		} 
		dataTimeRange("beginTime","endTime");
		

	</script>	
</body>

</html>